Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / .github / agents / speckit.git.feature.agent.md

Displaying Rendered • View rawDownload

.github/agents/speckit.git.feature.agent.md d9b024acde4db05002d2f413cfcffc5fd19927d5 (d9b024ac) Text, 3.33 KB

description: Create a feature branch with sequential or timestamp numbering


<!-- Extension: git -->
<!-- Config: .specify/extensions/git/ -->
Create Feature Branch

Create and switch to a new git feature branch for the given specification. This command handles branch creation only — the spec directory and files are created by the core T383838/speckit.specify workflow.

User Input

T282828
$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Environment Variable Override

If the user explicitly provided T383838GIT_BRANCH_NAME (e.g., via environment variable, argument, or in their request), pass it through to the script by setting the T383838GIT_BRANCH_NAME environment variable before invoking the script. When T383838GIT_BRANCH_NAME is set:
• The script uses the exact value as the branch name, bypassing all prefix/suffix generation
• T383838--short-name, T383838--number, and T383838--timestamp flags are ignored
• T383838FEATURE_NUM is extracted from the name if it starts with a numeric prefix, otherwise set to the full branch name

Prerequisites

• Verify Git is available by running T383838git rev-parse --is-inside-work-tree 2>/dev/null
• If Git is not available, warn the user and skip branch creation

Branch Numbering Mode

Determine the branch numbering strategy by checking configuration in this order:

1. Check T383838.specify/extensions/git/git-config.yml for T383838branch_numbering value
2. Check T383838.specify/init-options.json for T383838branch_numbering value (backward compatibility)
3. Default to T383838sequential if neither exists

Execution

Generate a concise short name (2-4 words) for the branch:
• Analyze the feature description and extract the most meaningful keywords
• Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
• Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)

Run the appropriate script based on your platform:

Bash: T383838.specify/extensions/git/scripts/bash/create-new-feature.sh --json --short-name "<short-name>" "<feature description>"
Bash (timestamp): T383838.specify/extensions/git/scripts/bash/create-new-feature.sh --json --timestamp --short-name "<short-name>" "<feature description>"
PowerShell: T383838.specify/extensions/git/scripts/powershell/create-new-feature.ps1 -Json -ShortName "<short-name>" "<feature description>"
PowerShell (timestamp): T383838.specify/extensions/git/scripts/powershell/create-new-feature.ps1 -Json -Timestamp -ShortName "<short-name>" "<feature description>"

IMPORTANT:
• Do NOT pass T383838--number — the script determines the correct next number automatically
• Always include the JSON flag (T383838--json for Bash, T383838-Json for PowerShell) so the output can be parsed reliably
• You must only ever run this script once per feature
• The JSON output will contain T383838BRANCH_NAME and T383838FEATURE_NUM

Graceful Degradation

If Git is not installed or the current directory is not a Git repository:
• Branch creation is skipped with a warning: T383838[specify] Warning: Git repository not detected; skipped branch creation
• The script still outputs T383838BRANCH_NAME and T383838FEATURE_NUM so the caller can reference them

Output

The script outputs JSON with:
• T383838BRANCH_NAME: The branch name (e.g., T383838003-user-auth or T38383820260319-143022-user-auth)
• T383838FEATURE_NUM: The numeric or timestamp prefix used

Served by rngit 1.5.1 - Generated in 0.04s